package org.deltaset.meta.internal;

import java.util.List;
import org.deltaset.meta.MetaField;
import static org.junit.Assert.*;

/**
 *
 * @author dmakariev
 */
class MetaClassFactoryTestUtil {

    static void assertFieldsOrder(String[] expectedFieldOrder, List<MetaField> acctualMetaFields) {
        assertNotNull(expectedFieldOrder);
        assertNotNull(acctualMetaFields);
        assertEquals("size of fields ", acctualMetaFields.size(), expectedFieldOrder.length);
        for (int i = 0; i < expectedFieldOrder.length; i++) {
            final String propertyName = acctualMetaFields.get(i).getPropertyName();
            final String expectedPropertyName = expectedFieldOrder[i];
            assertEquals(expectedPropertyName, propertyName);
        }
    }
}
